﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Collections;
using System.IO;
using SmartEP.Presenter;
using SmartEP.DTO;

namespace SmartDesktop
{
    public partial class ViewClaims : UserControl, IViewClaims
    {
        private ClaimInfoPresenter presenter;

        public ViewClaims()
        {
            InitializeComponent();
            this.Name = "View Claims";
            presenter = new ClaimInfoPresenter(this);
        }

        public void ShowClaims(IList<Claim> claim)
        {
            dgvClaims.DataSource = claim;
        }
        private void ViewClaims_Load(object sender, EventArgs e)
        {
            presenter.InitData();
        }

        #region Property
        int IViewClaims.ClaimId
        {
            get
            {
                return int.Parse(txtClaimID.Text);
            }
            set
            {
                txtClaimID.Text = Convert.ToString(value);
            }

        }

        string IViewClaims.MemberId
        {
            get
            {
                return txtPatientID.Text;
            }
            set
            {
                txtPatientID.Text = value;
            }
        }

        string IViewClaims.MemberName
        {
            get
            {
                return txtPatientName.Text;
            }
            set
            {
                txtPatientName.Text = value;
            }
        }
        #endregion

        private void btnSearch_Click(object sender, EventArgs e)
        {
            
        }

        private void dgvClaims_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
        {
            UIHelper.DataGridViewCellFormatting(dgvClaims, e);
        }
    }
}
